<template>
	<view class="my-container">
		<my-login v-if="!token"></my-login>
		<my-userinfo v-else></my-userinfo>
	</view>
</template>

<script>
	//按需导入mapstate辅助映射函数
	import {
		mapState
	} from 'vuex'
	import badgeMix from '@/mixins/tabbar-badge.js'
	export default {
		mixins:[badgeMix],
		data() {
			return {

			};
		},
		computed: {
			//将m_user模块中的token映射到当前页面
			...mapState('m_user', ['token'])
		}
	}
</script>

<style lang="scss">
	page,
	.my-container {
		height: 100%;

	}
</style>
